3.1.61 \(\int \frac {1}{(1+\sinh ^2(x))^2} \, dx\) [61]

Optimal. Leaf size=11 \[ \tanh (x)-\frac {\tanh ^3(x)}{3} \]

[Out]

tanh(x)-1/3*tanh(x)^3

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3254, 3852} \begin {gather*} \tanh (x)-\frac {\tanh ^3(x)}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + Sinh[x]^2)^(-2),x]

[Out]

Tanh[x] - Tanh[x]^3/3

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {1}{\left (1+\sinh ^2(x)\right )^2} \, dx &=\int \text {sech}^4(x) \, dx\\ &=i \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \tanh (x)\right )\\ &=\tanh (x)-\frac {\tanh ^3(x)}{3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 17, normalized size = 1.55 \begin {gather*} \frac {2 \tanh (x)}{3}+\frac {1}{3} \text {sech}^2(x) \tanh (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + Sinh[x]^2)^(-2),x]

[Out]

(2*Tanh[x])/3 + (Sech[x]^2*Tanh[x])/3

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(35\) vs. \(2(9)=18\).
time = 0.39, size = 36, normalized size = 3.27

method result size
risch \(-\frac {4 \left (3 \,{\mathrm e}^{2 x}+1\right )}{3 \left (1+{\mathrm e}^{2 x}\right )^{3}}\) \(19\)
default \(-\frac {2 \left (-\left (\tanh ^{5}\left (\frac {x}{2}\right )\right )-\frac {2 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3}-\tanh \left (\frac {x}{2}\right )\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}\) \(36\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+sinh(x)^2)^2,x,method=_RETURNVERBOSE)

[Out]

-2*(-tanh(1/2*x)^5-2/3*tanh(1/2*x)^3-tanh(1/2*x))/(tanh(1/2*x)^2+1)^3

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (9) = 18\).
time = 0.27, size = 49, normalized size = 4.45 \begin {gather*} \frac {4 \, e^{\left (-2 \, x\right )}}{3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1} + \frac {4}{3 \, {\left (3 \, e^{\left (-2 \, x\right )} + 3 \, e^{\left (-4 \, x\right )} + e^{\left (-6 \, x\right )} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sinh(x)^2)^2,x, algorithm="maxima")

[Out]

4*e^(-2*x)/(3*e^(-2*x) + 3*e^(-4*x) + e^(-6*x) + 1) + 4/3/(3*e^(-2*x) + 3*e^(-4*x) + e^(-6*x) + 1)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 84 vs. \(2 (9) = 18\).
time = 0.48, size = 84, normalized size = 7.64 \begin {gather*} -\frac {8 \, {\left (2 \, \cosh \left (x\right ) + \sinh \left (x\right )\right )}}{3 \, {\left (\cosh \left (x\right )^{5} + 5 \, \cosh \left (x\right ) \sinh \left (x\right )^{4} + \sinh \left (x\right )^{5} + {\left (10 \, \cosh \left (x\right )^{2} + 3\right )} \sinh \left (x\right )^{3} + 3 \, \cosh \left (x\right )^{3} + {\left (10 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + {\left (5 \, \cosh \left (x\right )^{4} + 9 \, \cosh \left (x\right )^{2} + 2\right )} \sinh \left (x\right ) + 4 \, \cosh \left (x\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sinh(x)^2)^2,x, algorithm="fricas")

[Out]

-8/3*(2*cosh(x) + sinh(x))/(cosh(x)^5 + 5*cosh(x)*sinh(x)^4 + sinh(x)^5 + (10*cosh(x)^2 + 3)*sinh(x)^3 + 3*cos
h(x)^3 + (10*cosh(x)^3 + 9*cosh(x))*sinh(x)^2 + (5*cosh(x)^4 + 9*cosh(x)^2 + 2)*sinh(x) + 4*cosh(x))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 104 vs. \(2 (8) = 16\).
time = 0.71, size = 104, normalized size = 9.45 \begin {gather*} \frac {6 \tanh ^{5}{\left (\frac {x}{2} \right )}}{3 \tanh ^{6}{\left (\frac {x}{2} \right )} + 9 \tanh ^{4}{\left (\frac {x}{2} \right )} + 9 \tanh ^{2}{\left (\frac {x}{2} \right )} + 3} + \frac {4 \tanh ^{3}{\left (\frac {x}{2} \right )}}{3 \tanh ^{6}{\left (\frac {x}{2} \right )} + 9 \tanh ^{4}{\left (\frac {x}{2} \right )} + 9 \tanh ^{2}{\left (\frac {x}{2} \right )} + 3} + \frac {6 \tanh {\left (\frac {x}{2} \right )}}{3 \tanh ^{6}{\left (\frac {x}{2} \right )} + 9 \tanh ^{4}{\left (\frac {x}{2} \right )} + 9 \tanh ^{2}{\left (\frac {x}{2} \right )} + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sinh(x)**2)**2,x)

[Out]

6*tanh(x/2)**5/(3*tanh(x/2)**6 + 9*tanh(x/2)**4 + 9*tanh(x/2)**2 + 3) + 4*tanh(x/2)**3/(3*tanh(x/2)**6 + 9*tan
h(x/2)**4 + 9*tanh(x/2)**2 + 3) + 6*tanh(x/2)/(3*tanh(x/2)**6 + 9*tanh(x/2)**4 + 9*tanh(x/2)**2 + 3)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 18, normalized size = 1.64 \begin {gather*} -\frac {4 \, {\left (3 \, e^{\left (2 \, x\right )} + 1\right )}}{3 \, {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sinh(x)^2)^2,x, algorithm="giac")

[Out]

-4/3*(3*e^(2*x) + 1)/(e^(2*x) + 1)^3

________________________________________________________________________________________

Mupad [B]
time = 0.59, size = 18, normalized size = 1.64 \begin {gather*} -\frac {4\,\left (3\,{\mathrm {e}}^{2\,x}+1\right )}{3\,{\left ({\mathrm {e}}^{2\,x}+1\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sinh(x)^2 + 1)^2,x)

[Out]

-(4*(3*exp(2*x) + 1))/(3*(exp(2*x) + 1)^3)

________________________________________________________________________________________